package com.puppet.building.service.impl;

import com.puppet.building.mapper.HouseMapper;
import com.puppet.building.pojo.House;
import com.puppet.building.pojo.dto.HouseDTO;
import com.puppet.building.pojo.vo.HouseVO;
import com.puppet.building.pojo.vo.StateVO;
import com.puppet.building.service.HouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HouseServiceImpl implements HouseService {
    @Autowired
    private HouseMapper houseMapper;
    @Override
    public Integer countHouseByBuildingId(Integer buildingId) {
        return houseMapper.countHouseByBuildingId(buildingId);
    }

    @Override
    public List<HouseVO> getHouseNoAnId() {
        return houseMapper.getHouseNoAnId();
    }

    @Override
    public List<House> getAllHouse(HouseDTO houseDTO) {
        return houseMapper.getAllHouse(houseDTO);
    }

    @Override
    public List<StateVO> getHouseAnState() {
        return houseMapper.getHouseAnState();
    }
}
